"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
    var ownKeys = function(o) {
        ownKeys = Object.getOwnPropertyNames || function (o) {
            var ar = [];
            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
            return ar;
        };
        return ownKeys(o);
    };
    return function (mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
        __setModuleDefault(result, mod);
        return result;
    };
})();
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
var _a, _b;
Object.defineProperty(exports, "__esModule", { value: true });
const vue_1 = require("vue");
const element_plus_1 = require("element-plus");
const fileApi_1 = require("@/api/fileApi");
const FileUploadView_vue_1 = __importDefault(require("./FileUploadView.vue"));
const element_plus_2 = require("element-plus");
const chunkDialogVisible = (0, vue_1.ref)(false);
const chunkData = (0, vue_1.ref)([]);
const currentFileId = (0, vue_1.ref)(null);
const question = (0, vue_1.ref)('');
const recallLoading = (0, vue_1.ref)(false);
const handleDelete = (id) => __awaiter(void 0, void 0, void 0, function* () {
    try {
        const res = yield (0, fileApi_1.deleteFile)(id.toString());
        if (res.data.code === 200) {
            element_plus_2.ElMessage.success(res.data.msg || '删除成功');
            refreshList();
        }
        else {
            element_plus_2.ElMessage.error(res.data.msg || '删除失败');
        }
    }
    catch (error) {
        element_plus_2.ElMessage.error('删除失败');
        console.error(error);
    }
});
const handleRecallTest = () => __awaiter(void 0, void 0, void 0, function* () {
    if (!recallQuestion.value || !recallQuestion.value.trim()) {
        element_plus_2.ElMessage.warning('请输入问题');
        return;
    }
    const loading = element_plus_2.ElLoading.service({
        lock: true,
        text: '正在测试...',
        background: 'rgba(0, 0, 0, 0.7)',
    });
    try {
        const res = yield (0, fileApi_1.recallTesting)(recallQuestion.value);
        if (res.data.code === 200) {
            if (res.data.data === null) {
                recallResults.value = [];
                element_plus_2.ElMessage.info('暂无承载数据');
            }
            else {
                recallResults.value = res.data.data.map((item) => (Object.assign(Object.assign({}, item), { chunks: item.chunks || [] })));
                element_plus_2.ElMessage.success('召回测试成功');
            }
        }
        else {
            element_plus_2.ElMessage.error(res.data.msg || '召回测试失败');
        }
    }
    catch (error) {
        if (error instanceof Error) {
            element_plus_2.ElMessage.error('召回测试失败: ' + error.message);
        }
        else {
            element_plus_2.ElMessage.error('召回测试失败');
        }
    }
    finally {
        loading.close();
    }
});
const showChunkDialog = (fileId) => __awaiter(void 0, void 0, void 0, function* () {
    currentFileId.value = fileId;
    const loading = element_plus_2.ElLoading.service({
        lock: true,
        text: '正在加载分块数据...',
        background: 'rgba(0, 0, 0, 0.7)',
    });
    try {
        const res = yield (0, fileApi_1.getSegDataPage)({ fileId });
        if (res.data.code === 200) {
            chunkData.value = res.data.data;
            chunkDialogVisible.value = true;
        }
        else {
            element_plus_2.ElMessage.error('获取分块数据失败: ' + (res.msg || '未知错误'));
        }
    }
    catch (error) {
        console.error('获取分块数据失败:', error);
        element_plus_2.ElMessage.error('获取分块数据失败: ' + error.message);
    }
    finally {
        loading.close();
    }
});
const fileUploadViewRef = (0, vue_1.ref)();
const showUploadDialog = (0, vue_1.ref)(false);
const openUploadDialog = () => {
    var _a;
    showUploadDialog.value = true;
    (_a = fileUploadViewRef.value) === null || _a === void 0 ? void 0 : _a.reset();
};
const showRecallTestDialog = () => {
    recallTestDialogVisible.value = true;
};
const recallTestDialogVisible = (0, vue_1.ref)(false);
const recallQuestion = (0, vue_1.ref)('');
const recallResults = (0, vue_1.ref)([]);
const loading = (0, vue_1.ref)(true);
const tableData = (0, vue_1.ref)([]);
const pagination = (0, vue_1.ref)({
    current: 1,
    size: 10,
    total: 0,
});
const getTagType = (typeName) => {
    if (!typeName)
        return 'info';
    const types = {
        图片: 'success',
        文档: 'primary',
        视频: 'warning',
        音频: 'danger',
    };
    return types[typeName] || 'info';
};
const refreshList = () => __awaiter(void 0, void 0, void 0, function* () {
    var _a, _b, _c, _d;
    try {
        loading.value = true;
        const res = yield (0, fileApi_1.getFileList)({
            pageNum: pagination.value.current,
            pageSize: pagination.value.size,
        });
        console.log('API Response:', res); // 调试日志
        if (((_a = res === null || res === void 0 ? void 0 : res.data) === null || _a === void 0 ? void 0 : _a.code) === 200) {
            tableData.value = ((_b = res.data.data) === null || _b === void 0 ? void 0 : _b.records) || [];
            pagination.value.total = ((_c = res.data.data) === null || _c === void 0 ? void 0 : _c.total) || 0;
        }
        else {
            console.error('接口异常:', (_d = res === null || res === void 0 ? void 0 : res.data) === null || _d === void 0 ? void 0 : _d.msg);
        }
    }
    catch (error) {
        console.error('请求失败:', error);
        tableData.value = [];
    }
    finally {
        loading.value = false;
    }
});
const handleUploadSuccess = () => {
    refreshList();
    showUploadDialog.value = false;
};
const handleSizeChange = (size) => {
    pagination.value.size = size;
    refreshList();
};
const handleCurrentChange = (current) => {
    pagination.value.current = current;
    refreshList();
};
(0, vue_1.onMounted)(() => {
    refreshList();
});
debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
const __VLS_ctx = {};
let __VLS_components;
let __VLS_directives;
/** @type {__VLS_StyleScopedClasses['file-management']} */ ;
/** @type {__VLS_StyleScopedClasses['el-card']} */ ;
// CSS variable injection 
// CSS variable injection end 
__VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)(Object.assign({ class: "file-management" }));
const __VLS_0 = {}.ElCard;
/** @type {[typeof __VLS_components.ElCard, typeof __VLS_components.elCard, typeof __VLS_components.ElCard, typeof __VLS_components.elCard, ]} */ ;
// @ts-ignore
const __VLS_1 = __VLS_asFunctionalComponent(__VLS_0, new __VLS_0({
    shadow: "hover",
}));
const __VLS_2 = __VLS_1({
    shadow: "hover",
}, ...__VLS_functionalComponentArgsRest(__VLS_1));
__VLS_3.slots.default;
{
    const { header: __VLS_thisSlot } = __VLS_3.slots;
    __VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)(Object.assign({ class: "flex justify-between items-center" }));
    __VLS_asFunctionalElement(__VLS_intrinsicElements.span, __VLS_intrinsicElements.span)(Object.assign({ class: "text-lg font-medium" }));
    __VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({});
    const __VLS_4 = {}.ElButton;
    /** @type {[typeof __VLS_components.ElButton, typeof __VLS_components.elButton, typeof __VLS_components.ElButton, typeof __VLS_components.elButton, ]} */ ;
    // @ts-ignore
    const __VLS_5 = __VLS_asFunctionalComponent(__VLS_4, new __VLS_4(Object.assign({ 'onClick': {} }, { type: "primary", size: "small" })));
    const __VLS_6 = __VLS_5(Object.assign({ 'onClick': {} }, { type: "primary", size: "small" }), ...__VLS_functionalComponentArgsRest(__VLS_5));
    let __VLS_8;
    let __VLS_9;
    let __VLS_10;
    const __VLS_11 = {
        onClick: (__VLS_ctx.refreshList)
    };
    __VLS_7.slots.default;
    var __VLS_7;
    const __VLS_12 = {}.ElButton;
    /** @type {[typeof __VLS_components.ElButton, typeof __VLS_components.elButton, typeof __VLS_components.ElButton, typeof __VLS_components.elButton, ]} */ ;
    // @ts-ignore
    const __VLS_13 = __VLS_asFunctionalComponent(__VLS_12, new __VLS_12(Object.assign({ 'onClick': {} }, { type: "success", size: "small" })));
    const __VLS_14 = __VLS_13(Object.assign({ 'onClick': {} }, { type: "success", size: "small" }), ...__VLS_functionalComponentArgsRest(__VLS_13));
    let __VLS_16;
    let __VLS_17;
    let __VLS_18;
    const __VLS_19 = {
        onClick: (__VLS_ctx.openUploadDialog)
    };
    __VLS_15.slots.default;
    var __VLS_15;
    const __VLS_20 = {}.ElButton;
    /** @type {[typeof __VLS_components.ElButton, typeof __VLS_components.elButton, typeof __VLS_components.ElButton, typeof __VLS_components.elButton, ]} */ ;
    // @ts-ignore
    const __VLS_21 = __VLS_asFunctionalComponent(__VLS_20, new __VLS_20(Object.assign({ 'onClick': {} }, { type: "primary", size: "small" })));
    const __VLS_22 = __VLS_21(Object.assign({ 'onClick': {} }, { type: "primary", size: "small" }), ...__VLS_functionalComponentArgsRest(__VLS_21));
    let __VLS_24;
    let __VLS_25;
    let __VLS_26;
    const __VLS_27 = {
        onClick: (__VLS_ctx.showRecallTestDialog)
    };
    __VLS_23.slots.default;
    var __VLS_23;
}
const __VLS_28 = {}.ElDialog;
/** @type {[typeof __VLS_components.ElDialog, typeof __VLS_components.elDialog, typeof __VLS_components.ElDialog, typeof __VLS_components.elDialog, ]} */ ;
// @ts-ignore
const __VLS_29 = __VLS_asFunctionalComponent(__VLS_28, new __VLS_28({
    modelValue: (__VLS_ctx.showUploadDialog),
    title: "文件上传",
    width: "50%",
}));
const __VLS_30 = __VLS_29({
    modelValue: (__VLS_ctx.showUploadDialog),
    title: "文件上传",
    width: "50%",
}, ...__VLS_functionalComponentArgsRest(__VLS_29));
__VLS_31.slots.default;
/** @type {[typeof FileUploadView, ]} */ ;
// @ts-ignore
const __VLS_32 = __VLS_asFunctionalComponent(FileUploadView_vue_1.default, new FileUploadView_vue_1.default(Object.assign(Object.assign({ 'onUploadSuccess': {} }, { 'onCloseDialog': {} }), { modelValue: (__VLS_ctx.showUploadDialog), ref: "fileUploadViewRef" })));
const __VLS_33 = __VLS_32(Object.assign(Object.assign({ 'onUploadSuccess': {} }, { 'onCloseDialog': {} }), { modelValue: (__VLS_ctx.showUploadDialog), ref: "fileUploadViewRef" }), ...__VLS_functionalComponentArgsRest(__VLS_32));
let __VLS_35;
let __VLS_36;
let __VLS_37;
const __VLS_38 = {
    onUploadSuccess: (__VLS_ctx.handleUploadSuccess)
};
const __VLS_39 = {
    onCloseDialog: (...[$event]) => {
        __VLS_ctx.showUploadDialog = false;
    }
};
/** @type {typeof __VLS_ctx.fileUploadViewRef} */ ;
var __VLS_40 = {};
var __VLS_34;
var __VLS_31;
const __VLS_42 = {}.ElTable;
/** @type {[typeof __VLS_components.ElTable, typeof __VLS_components.elTable, typeof __VLS_components.ElTable, typeof __VLS_components.elTable, ]} */ ;
// @ts-ignore
const __VLS_43 = __VLS_asFunctionalComponent(__VLS_42, new __VLS_42(Object.assign({ data: (__VLS_ctx.tableData), stripe: true, border: true }, { style: {} })));
const __VLS_44 = __VLS_43(Object.assign({ data: (__VLS_ctx.tableData), stripe: true, border: true }, { style: {} }), ...__VLS_functionalComponentArgsRest(__VLS_43));
__VLS_asFunctionalDirective(__VLS_directives.vLoading)(null, Object.assign(Object.assign({}, __VLS_directiveBindingRestFields), { value: (__VLS_ctx.loading) }), null, null);
__VLS_45.slots.default;
const __VLS_46 = {}.ElTableColumn;
/** @type {[typeof __VLS_components.ElTableColumn, typeof __VLS_components.elTableColumn, ]} */ ;
// @ts-ignore
const __VLS_47 = __VLS_asFunctionalComponent(__VLS_46, new __VLS_46({
    prop: "id",
    label: "ID",
    width: "80",
    align: "center",
}));
const __VLS_48 = __VLS_47({
    prop: "id",
    label: "ID",
    width: "80",
    align: "center",
}, ...__VLS_functionalComponentArgsRest(__VLS_47));
const __VLS_50 = {}.ElTableColumn;
/** @type {[typeof __VLS_components.ElTableColumn, typeof __VLS_components.elTableColumn, ]} */ ;
// @ts-ignore
const __VLS_51 = __VLS_asFunctionalComponent(__VLS_50, new __VLS_50({
    prop: "name",
    label: "文件名",
    minWidth: "150",
}));
const __VLS_52 = __VLS_51({
    prop: "name",
    label: "文件名",
    minWidth: "150",
}, ...__VLS_functionalComponentArgsRest(__VLS_51));
const __VLS_54 = {}.ElTableColumn;
/** @type {[typeof __VLS_components.ElTableColumn, typeof __VLS_components.elTableColumn, typeof __VLS_components.ElTableColumn, typeof __VLS_components.elTableColumn, ]} */ ;
// @ts-ignore
const __VLS_55 = __VLS_asFunctionalComponent(__VLS_54, new __VLS_54({
    prop: "typeName",
    label: "类型",
    width: "120",
    align: "center",
}));
const __VLS_56 = __VLS_55({
    prop: "typeName",
    label: "类型",
    width: "120",
    align: "center",
}, ...__VLS_functionalComponentArgsRest(__VLS_55));
__VLS_57.slots.default;
{
    const { default: __VLS_thisSlot } = __VLS_57.slots;
    const [scope] = __VLS_getSlotParams(__VLS_thisSlot);
    const __VLS_58 = {}.ElTag;
    /** @type {[typeof __VLS_components.ElTag, typeof __VLS_components.elTag, typeof __VLS_components.ElTag, typeof __VLS_components.elTag, ]} */ ;
    // @ts-ignore
    const __VLS_59 = __VLS_asFunctionalComponent(__VLS_58, new __VLS_58({
        type: (__VLS_ctx.getTagType(scope.row.typeName)),
    }));
    const __VLS_60 = __VLS_59({
        type: (__VLS_ctx.getTagType(scope.row.typeName)),
    }, ...__VLS_functionalComponentArgsRest(__VLS_59));
    __VLS_61.slots.default;
    (((_a = scope === null || scope === void 0 ? void 0 : scope.row) === null || _a === void 0 ? void 0 : _a.typeName) || '未知');
    var __VLS_61;
}
var __VLS_57;
const __VLS_62 = {}.ElTableColumn;
/** @type {[typeof __VLS_components.ElTableColumn, typeof __VLS_components.elTableColumn, typeof __VLS_components.ElTableColumn, typeof __VLS_components.elTableColumn, ]} */ ;
// @ts-ignore
const __VLS_63 = __VLS_asFunctionalComponent(__VLS_62, new __VLS_62({
    prop: "createAt",
    label: "创建时间",
    width: "180",
    align: "center",
}));
const __VLS_64 = __VLS_63({
    prop: "createAt",
    label: "创建时间",
    width: "180",
    align: "center",
}, ...__VLS_functionalComponentArgsRest(__VLS_63));
__VLS_65.slots.default;
{
    const { default: __VLS_thisSlot } = __VLS_65.slots;
    const [scope] = __VLS_getSlotParams(__VLS_thisSlot);
    __VLS_asFunctionalElement(__VLS_intrinsicElements.span, __VLS_intrinsicElements.span)({});
    (((_b = scope === null || scope === void 0 ? void 0 : scope.row) === null || _b === void 0 ? void 0 : _b.createAt) ? new Date(scope.row.createAt).toLocaleString() : '-');
}
var __VLS_65;
const __VLS_66 = {}.ElTableColumn;
/** @type {[typeof __VLS_components.ElTableColumn, typeof __VLS_components.elTableColumn, typeof __VLS_components.ElTableColumn, typeof __VLS_components.elTableColumn, ]} */ ;
// @ts-ignore
const __VLS_67 = __VLS_asFunctionalComponent(__VLS_66, new __VLS_66({
    label: "操作",
    width: "180",
    align: "center",
}));
const __VLS_68 = __VLS_67({
    label: "操作",
    width: "180",
    align: "center",
}, ...__VLS_functionalComponentArgsRest(__VLS_67));
__VLS_69.slots.default;
{
    const { default: __VLS_thisSlot } = __VLS_69.slots;
    const [scope] = __VLS_getSlotParams(__VLS_thisSlot);
    const __VLS_70 = {}.ElButton;
    /** @type {[typeof __VLS_components.ElButton, typeof __VLS_components.elButton, typeof __VLS_components.ElButton, typeof __VLS_components.elButton, ]} */ ;
    // @ts-ignore
    const __VLS_71 = __VLS_asFunctionalComponent(__VLS_70, new __VLS_70(Object.assign({ 'onClick': {} }, { type: "primary", size: "small" })));
    const __VLS_72 = __VLS_71(Object.assign({ 'onClick': {} }, { type: "primary", size: "small" }), ...__VLS_functionalComponentArgsRest(__VLS_71));
    let __VLS_74;
    let __VLS_75;
    let __VLS_76;
    const __VLS_77 = {
        onClick: (...[$event]) => {
            __VLS_ctx.showChunkDialog(scope.row.id);
        }
    };
    __VLS_73.slots.default;
    var __VLS_73;
    const __VLS_78 = {}.ElButton;
    /** @type {[typeof __VLS_components.ElButton, typeof __VLS_components.elButton, typeof __VLS_components.ElButton, typeof __VLS_components.elButton, ]} */ ;
    // @ts-ignore
    const __VLS_79 = __VLS_asFunctionalComponent(__VLS_78, new __VLS_78(Object.assign({ 'onClick': {} }, { type: "danger", size: "small" })));
    const __VLS_80 = __VLS_79(Object.assign({ 'onClick': {} }, { type: "danger", size: "small" }), ...__VLS_functionalComponentArgsRest(__VLS_79));
    let __VLS_82;
    let __VLS_83;
    let __VLS_84;
    const __VLS_85 = {
        onClick: (...[$event]) => {
            __VLS_ctx.handleDelete(scope.row.id);
        }
    };
    __VLS_81.slots.default;
    var __VLS_81;
}
var __VLS_69;
var __VLS_45;
__VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)(Object.assign({ class: "pagination-container" }));
const __VLS_86 = {}.ElDialog;
/** @type {[typeof __VLS_components.ElDialog, typeof __VLS_components.elDialog, typeof __VLS_components.ElDialog, typeof __VLS_components.elDialog, ]} */ ;
// @ts-ignore
const __VLS_87 = __VLS_asFunctionalComponent(__VLS_86, new __VLS_86({
    modelValue: (__VLS_ctx.chunkDialogVisible),
    title: "文件分块内容",
    width: "70%",
}));
const __VLS_88 = __VLS_87({
    modelValue: (__VLS_ctx.chunkDialogVisible),
    title: "文件分块内容",
    width: "70%",
}, ...__VLS_functionalComponentArgsRest(__VLS_87));
__VLS_89.slots.default;
for (const [chunk, index] of __VLS_getVForSourceType((__VLS_ctx.chunkData))) {
    __VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)(Object.assign({ key: (chunk.id) }, { style: {} }));
    __VLS_asFunctionalElement(__VLS_intrinsicElements.h4, __VLS_intrinsicElements.h4)({});
    (index + 1);
    const __VLS_90 = {}.ElCard;
    /** @type {[typeof __VLS_components.ElCard, typeof __VLS_components.elCard, typeof __VLS_components.ElCard, typeof __VLS_components.elCard, ]} */ ;
    // @ts-ignore
    const __VLS_91 = __VLS_asFunctionalComponent(__VLS_90, new __VLS_90({}));
    const __VLS_92 = __VLS_91({}, ...__VLS_functionalComponentArgsRest(__VLS_91));
    __VLS_93.slots.default;
    __VLS_asFunctionalElement(__VLS_intrinsicElements.p, __VLS_intrinsicElements.p)({});
    (chunk.content);
    if (chunk.keywords && chunk.keywords.length > 0) {
        __VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({});
        __VLS_asFunctionalElement(__VLS_intrinsicElements.h5, __VLS_intrinsicElements.h5)({});
        for (const [keyword, i] of __VLS_getVForSourceType((chunk.keywords))) {
            const __VLS_94 = {}.ElTag;
            /** @type {[typeof __VLS_components.ElTag, typeof __VLS_components.elTag, typeof __VLS_components.ElTag, typeof __VLS_components.elTag, ]} */ ;
            // @ts-ignore
            const __VLS_95 = __VLS_asFunctionalComponent(__VLS_94, new __VLS_94(Object.assign({ key: (i) }, { style: {} })));
            const __VLS_96 = __VLS_95(Object.assign({ key: (i) }, { style: {} }), ...__VLS_functionalComponentArgsRest(__VLS_95));
            __VLS_97.slots.default;
            (keyword);
            var __VLS_97;
        }
    }
    var __VLS_93;
}
{
    const { footer: __VLS_thisSlot } = __VLS_89.slots;
    const __VLS_98 = {}.ElButton;
    /** @type {[typeof __VLS_components.ElButton, typeof __VLS_components.elButton, typeof __VLS_components.ElButton, typeof __VLS_components.elButton, ]} */ ;
    // @ts-ignore
    const __VLS_99 = __VLS_asFunctionalComponent(__VLS_98, new __VLS_98(Object.assign({ 'onClick': {} })));
    const __VLS_100 = __VLS_99(Object.assign({ 'onClick': {} }), ...__VLS_functionalComponentArgsRest(__VLS_99));
    let __VLS_102;
    let __VLS_103;
    let __VLS_104;
    const __VLS_105 = {
        onClick: (...[$event]) => {
            __VLS_ctx.chunkDialogVisible = false;
        }
    };
    __VLS_101.slots.default;
    var __VLS_101;
}
var __VLS_89;
const __VLS_106 = {}.ElDialog;
/** @type {[typeof __VLS_components.ElDialog, typeof __VLS_components.elDialog, typeof __VLS_components.ElDialog, typeof __VLS_components.elDialog, ]} */ ;
// @ts-ignore
const __VLS_107 = __VLS_asFunctionalComponent(__VLS_106, new __VLS_106({
    modelValue: (__VLS_ctx.recallTestDialogVisible),
    title: "召回测试",
    width: "70%",
}));
const __VLS_108 = __VLS_107({
    modelValue: (__VLS_ctx.recallTestDialogVisible),
    title: "召回测试",
    width: "70%",
}, ...__VLS_functionalComponentArgsRest(__VLS_107));
__VLS_109.slots.default;
__VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)(Object.assign({ style: {} }));
const __VLS_110 = {}.ElInput;
/** @type {[typeof __VLS_components.ElInput, typeof __VLS_components.elInput, ]} */ ;
// @ts-ignore
const __VLS_111 = __VLS_asFunctionalComponent(__VLS_110, new __VLS_110(Object.assign({ modelValue: (__VLS_ctx.recallQuestion), placeholder: "请输入测试问题" }, { style: {} })));
const __VLS_112 = __VLS_111(Object.assign({ modelValue: (__VLS_ctx.recallQuestion), placeholder: "请输入测试问题" }, { style: {} }), ...__VLS_functionalComponentArgsRest(__VLS_111));
const __VLS_114 = {}.ElButton;
/** @type {[typeof __VLS_components.ElButton, typeof __VLS_components.elButton, typeof __VLS_components.ElButton, typeof __VLS_components.elButton, ]} */ ;
// @ts-ignore
const __VLS_115 = __VLS_asFunctionalComponent(__VLS_114, new __VLS_114(Object.assign({ 'onClick': {} }, { type: "primary" })));
const __VLS_116 = __VLS_115(Object.assign({ 'onClick': {} }, { type: "primary" }), ...__VLS_functionalComponentArgsRest(__VLS_115));
let __VLS_118;
let __VLS_119;
let __VLS_120;
const __VLS_121 = {
    onClick: (__VLS_ctx.handleRecallTest)
};
__VLS_117.slots.default;
var __VLS_117;
const __VLS_122 = {}.ElTable;
/** @type {[typeof __VLS_components.ElTable, typeof __VLS_components.elTable, typeof __VLS_components.ElTable, typeof __VLS_components.elTable, ]} */ ;
// @ts-ignore
const __VLS_123 = __VLS_asFunctionalComponent(__VLS_122, new __VLS_122(Object.assign(Object.assign({ data: (__VLS_ctx.recallResults) }, { style: {} }), { border: true, stripe: true })));
const __VLS_124 = __VLS_123(Object.assign(Object.assign({ data: (__VLS_ctx.recallResults) }, { style: {} }), { border: true, stripe: true }), ...__VLS_functionalComponentArgsRest(__VLS_123));
__VLS_125.slots.default;
const __VLS_126 = {}.ElTableColumn;
/** @type {[typeof __VLS_components.ElTableColumn, typeof __VLS_components.elTableColumn, ]} */ ;
// @ts-ignore
const __VLS_127 = __VLS_asFunctionalComponent(__VLS_126, new __VLS_126({
    prop: "name",
    label: "文件名",
    width: "180",
    align: "center",
}));
const __VLS_128 = __VLS_127({
    prop: "name",
    label: "文件名",
    width: "180",
    align: "center",
}, ...__VLS_functionalComponentArgsRest(__VLS_127));
const __VLS_130 = {}.ElTableColumn;
/** @type {[typeof __VLS_components.ElTableColumn, typeof __VLS_components.elTableColumn, typeof __VLS_components.ElTableColumn, typeof __VLS_components.elTableColumn, ]} */ ;
// @ts-ignore
const __VLS_131 = __VLS_asFunctionalComponent(__VLS_130, new __VLS_130({
    prop: "typeName",
    label: "类型",
    width: "100",
    align: "center",
}));
const __VLS_132 = __VLS_131({
    prop: "typeName",
    label: "类型",
    width: "100",
    align: "center",
}, ...__VLS_functionalComponentArgsRest(__VLS_131));
__VLS_133.slots.default;
{
    const { default: __VLS_thisSlot } = __VLS_133.slots;
    const [scope] = __VLS_getSlotParams(__VLS_thisSlot);
    const __VLS_134 = {}.ElTag;
    /** @type {[typeof __VLS_components.ElTag, typeof __VLS_components.elTag, typeof __VLS_components.ElTag, typeof __VLS_components.elTag, ]} */ ;
    // @ts-ignore
    const __VLS_135 = __VLS_asFunctionalComponent(__VLS_134, new __VLS_134({
        type: (__VLS_ctx.getTagType(scope.row.typeName)),
    }));
    const __VLS_136 = __VLS_135({
        type: (__VLS_ctx.getTagType(scope.row.typeName)),
    }, ...__VLS_functionalComponentArgsRest(__VLS_135));
    __VLS_137.slots.default;
    (scope.row.typeName || '未知');
    var __VLS_137;
}
var __VLS_133;
const __VLS_138 = {}.ElTableColumn;
/** @type {[typeof __VLS_components.ElTableColumn, typeof __VLS_components.elTableColumn, typeof __VLS_components.ElTableColumn, typeof __VLS_components.elTableColumn, ]} */ ;
// @ts-ignore
const __VLS_139 = __VLS_asFunctionalComponent(__VLS_138, new __VLS_138({
    label: "内容",
    minWidth: "300",
}));
const __VLS_140 = __VLS_139({
    label: "内容",
    minWidth: "300",
}, ...__VLS_functionalComponentArgsRest(__VLS_139));
__VLS_141.slots.default;
{
    const { default: __VLS_thisSlot } = __VLS_141.slots;
    const [scope] = __VLS_getSlotParams(__VLS_thisSlot);
    for (const [chunk, index] of __VLS_getVForSourceType((scope.row.chunks))) {
        __VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)(Object.assign({ key: (chunk.id) }, { style: {} }));
        const __VLS_142 = {}.ElCard;
        /** @type {[typeof __VLS_components.ElCard, typeof __VLS_components.elCard, typeof __VLS_components.ElCard, typeof __VLS_components.elCard, ]} */ ;
        // @ts-ignore
        const __VLS_143 = __VLS_asFunctionalComponent(__VLS_142, new __VLS_142(Object.assign({ shadow: "hover" }, { style: {} })));
        const __VLS_144 = __VLS_143(Object.assign({ shadow: "hover" }, { style: {} }), ...__VLS_functionalComponentArgsRest(__VLS_143));
        __VLS_145.slots.default;
        __VLS_asFunctionalElement(__VLS_intrinsicElements.p, __VLS_intrinsicElements.p)(Object.assign({ style: {} }));
        (chunk.content);
        var __VLS_145;
        if (chunk.keywords && chunk.keywords.length > 0) {
            __VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)(Object.assign({ style: {} }));
            for (const [keyword, i] of __VLS_getVForSourceType((chunk.keywords))) {
                const __VLS_146 = {}.ElTag;
                /** @type {[typeof __VLS_components.ElTag, typeof __VLS_components.elTag, typeof __VLS_components.ElTag, typeof __VLS_components.elTag, ]} */ ;
                // @ts-ignore
                const __VLS_147 = __VLS_asFunctionalComponent(__VLS_146, new __VLS_146(Object.assign({ key: (i), type: "info" }, { style: {} })));
                const __VLS_148 = __VLS_147(Object.assign({ key: (i), type: "info" }, { style: {} }), ...__VLS_functionalComponentArgsRest(__VLS_147));
                __VLS_149.slots.default;
                (keyword);
                var __VLS_149;
            }
        }
    }
}
var __VLS_141;
var __VLS_125;
var __VLS_109;
if (false) {
    const __VLS_150 = {}.ElPagination;
    /** @type {[typeof __VLS_components.ElPagination, typeof __VLS_components.elPagination, ]} */ ;
    // @ts-ignore
    const __VLS_151 = __VLS_asFunctionalComponent(__VLS_150, new __VLS_150(Object.assign(Object.assign({ 'onSizeChange': {} }, { 'onCurrentChange': {} }), { currentPage: (__VLS_ctx.pagination.current), pageSize: (__VLS_ctx.pagination.size), total: (__VLS_ctx.pagination.total), pageSizes: ([10, 20, 50, 100]), layout: "total, sizes, prev, pager, next, jumper" })));
    const __VLS_152 = __VLS_151(Object.assign(Object.assign({ 'onSizeChange': {} }, { 'onCurrentChange': {} }), { currentPage: (__VLS_ctx.pagination.current), pageSize: (__VLS_ctx.pagination.size), total: (__VLS_ctx.pagination.total), pageSizes: ([10, 20, 50, 100]), layout: "total, sizes, prev, pager, next, jumper" }), ...__VLS_functionalComponentArgsRest(__VLS_151));
    let __VLS_154;
    let __VLS_155;
    let __VLS_156;
    const __VLS_157 = {
        onSizeChange: (__VLS_ctx.handleSizeChange)
    };
    const __VLS_158 = {
        onCurrentChange: (__VLS_ctx.handleCurrentChange)
    };
    var __VLS_153;
}
var __VLS_3;
/** @type {__VLS_StyleScopedClasses['file-management']} */ ;
/** @type {__VLS_StyleScopedClasses['flex']} */ ;
/** @type {__VLS_StyleScopedClasses['justify-between']} */ ;
/** @type {__VLS_StyleScopedClasses['items-center']} */ ;
/** @type {__VLS_StyleScopedClasses['text-lg']} */ ;
/** @type {__VLS_StyleScopedClasses['font-medium']} */ ;
/** @type {__VLS_StyleScopedClasses['pagination-container']} */ ;
// @ts-ignore
var __VLS_41 = __VLS_40;
var __VLS_dollars;
const __VLS_self = (await Promise.resolve().then(() => __importStar(require('vue')))).defineComponent({
    setup() {
        return {
            ElPagination: element_plus_1.ElPagination,
            FileUploadView: FileUploadView_vue_1.default,
            chunkDialogVisible: chunkDialogVisible,
            chunkData: chunkData,
            handleDelete: handleDelete,
            handleRecallTest: handleRecallTest,
            showChunkDialog: showChunkDialog,
            fileUploadViewRef: fileUploadViewRef,
            showUploadDialog: showUploadDialog,
            openUploadDialog: openUploadDialog,
            showRecallTestDialog: showRecallTestDialog,
            recallTestDialogVisible: recallTestDialogVisible,
            recallQuestion: recallQuestion,
            recallResults: recallResults,
            loading: loading,
            tableData: tableData,
            pagination: pagination,
            getTagType: getTagType,
            refreshList: refreshList,
            handleUploadSuccess: handleUploadSuccess,
            handleSizeChange: handleSizeChange,
            handleCurrentChange: handleCurrentChange,
        };
    },
});
exports.default = (await Promise.resolve().then(() => __importStar(require('vue')))).defineComponent({
    setup() {
        return {};
    },
});
; /* PartiallyEnd: #4569/main.vue */
